proc msg:sndnote {nick host handle arg} {
global botnick home
  set argument [lindex $arg 0]
if {[string match "#*" $argument] && [validchan $argument]} {
  set chan $argument
  set otbn1 [lindex $arg 1]
  set botnet2 [lrange $arg 2 end]
  } else {
  set chan $home
  set otbn1 [lindex $arg 0]
  set botnet2 [lrange $arg 1 end]
  }
  if {![matchattr $handle o|v $chan] && ![matchattr $handle o|o $chan]} {
  putserv "NOTICE $nick :Unable To Execute Command - Permission Denied."
  return 0
  }
  if {![matchattr $handle A]} {
  putserv "NOTICE $nick :ERROR - Unable To Execute Command - You need to authenticate first - Permission Denied."
  putserv "NOTICE $nick :You may authenticate yourself by typing \002/msg $botnick auth <your password>\002"
  return 0
  }
if {[matchattr $handle D]} {
  putserv "NOTICE $nick :Unable To Execute Command - Access Is Disabled - Permission Denied."
  return 0
  }
  sndnote $nick $handle $otbn1 $botnet2 $host $chan
  return 0
  }


